<?php

require_once 'library/api_response.php';

abstract class API_Client {
	
	protected $token = '';
	
	public function __construct() {
		
	}
	
	private function request( $method, $parmeters ) {
		
	}
	
	public function __call( $method, $parmeters ) {
		$this->request( $method, $parmeters );
	}
	
	public function getToken() {
		return $this->token;
	}
	
	public function setToken( $token ) {
		if(!is_string($token)) {
			throw new Exception("The token is supposed to be a string");
		}
		$this->token = $token;
	}
	
	private function generateToken() {
		$this->setToken( $this->createToken() );
	}
}